import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;


public class Window extends JFrame {
	private static final long serialVersionUID = 1L;
	
	public Window(){
		super("Extreme Poker Challenge");       //adds title
		
		//Creates the menu bar on the window
		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);
		
		//Creates the dropdown titles
		JMenu fileMenu = new JMenu("File");
		menuBar.add(fileMenu);
		
		//Creates Menu dropdown actions
		JMenuItem newAction = new JMenuItem("New");
	    JMenuItem openAction = new JMenuItem("Open");
	    JMenuItem exitAction = new JMenuItem("Exit");
	    
	    //Adds the actions to the Title
	    fileMenu.add(newAction);
	    fileMenu.add(openAction);
	    fileMenu.add(exitAction);
	    
	    // Action for pressing the new button
        newAction.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				System.out.print("You have pressed the new action");
			}
        });
        // Action for pressing the Exit button
		exitAction.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				System.exit(0);
			}
        });
	}

}
